# -*- coding: utf-8 -*-

import web
import random
from hello import session
class hello:
    def GET(self,name='audoe'):
        session.count+=1
        sex='boy,gril'
        return render.index(name=name,sex=sex)+str(en_decode.endecode(name))

    	# return "hello"+str(session.count)
class printweb:
    def GET(self):
        return 'the is my first app,beginning '
    def POST(self):
        return 'the is my first app,beginning POST'
class line:
    def GET(self):
        
        session.count+=1
        web.seeother('/hello')
class audoe:
    def GET(self):
        test=oncheck.returnRandom(0,9999999)
        session.count+=1
        stri="你玩七星彩吗？使用以下数来买有可能中个五百万哦:"+test.intNum()+",session数为:"+str(session.count)
        return stri
class fucaiNum:
    def GET(self):
        num=fucai()
        strNum='红球:'
        numCount=0
        for i in num:
             if numCount==6:
                 strNum+="蓝球："+str(i)
             elif numCount==5:
                 strNum+=str(i)
             else:
                 strNum+=str(i)+","
             numCount+=1
        return "你买双色球吗？以下的数可能对你有帮助哦！"+strNum
def fucai():
    redBall=range(1,34)
    num=[]
    for i in range(0,6):
        a=random.randint(0,32-i)
        num.append(redBall[a])
        del redBall[a]
    num.append(random.randint(1,16))
    return num
class admin:
    def GET(self):
        session.count+=1
        return 'admin'
class reset:
    def GET(self):
        session.kill()
        return ''

